<div id="pwd">
    <div class="red">
        [$result.msg]
    </div>
    <form action="/admin/admin_user/changepwd" name="changepwd" id="changepwd" method="post">
        <div class="left">
            <table>
                <tr>
                    <td width="200px">
                        原始密码
                    </td>
                    <td>
                        <input type="password" value="" id="old" name="old"/>
                    </td>
                </tr>
                <tr>
                    <td width="200px">
                        新 密 码
                    </td>
                    <td>
                        <input type="password" value="" id="new" name="new"/>
                    </td>
                </tr>
                <tr>
                    <td width="200px">
                        密码确认
                    </td>
                    <td>
                        <input type="password" value="" id="repeat" name="repeat"/>
                    </td>
                </tr>
            </table><input type="submit" class="input" name="submit_btn" value="保存"/>
        </div>
    </form>
    <script>
        $(function(){
            $(":submit").click(function(e){
                if ($("#old").val() == "" || $("#new").val() == "") {
                    $.showPageInfo("#page_info", "密码不能为空", 500, true);
                    return false;
                }
                if ($("#new").val() != $("#repeat").val()) {
                    $.showPageInfo("#page_info", "两次输入密码不一致", 500, true);
                    return false;
                }
                $.ajaxSubmit($(this).parents('form'), function(data){
                    $.showPageInfo("#page_info", data.info, 500, true);
                });
                return false;
            });
            
        })
    </script>
</div>
